-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Create codemod for v0.39.0 -> v0.40.0 #259
Merged
wschurman
merged 1 commit into
main
from
@wschurman/02-23-feat_create_codemod_for_v0.39.0_-_v0.40.0
Feb 24, 2025
Merged
feat: Create codemod for v0.39.0 -> v0.40.0 #259
wschurman
merged 1 commit into
main
from
@wschurman/02-23-feat_create_codemod_for_v0.39.0_-_v0.40.0
Feb 24, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Feb 24, 2025
863332f
to
adcaf3b
Compare
01b2606
to
7be217a
Compare
7be217a
to
857a69b
Compare
adcaf3b
to
c6f74a1
Compare
828daef
to
4937a66
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #259 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 80 80
Lines 2053 2053
Branches 277 277
=========================================
Hits 2053 2053
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
de4134d
to
8f868b2
Compare
8f868b2
to
9d27f21
Compare
quinlanj
approved these changes
Feb 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
The PRs downstack from this one introduce a number of breaking changes to the syntax for create/update/delete/load-association of entities.
While typescript is sufficient to detect where the breaking changes affect an application that uses entity, it is not sufficient to update them. For large applications, this migration would be impossible without a tool to automatically update most callsites. For example, upon dry-running an upgrade of these packages in the Expo server,
tsc
reports 2204 errors in 444 files.This PR adds a
jscodeshift
codemod for the bulk of the breaking changes.Some notable exceptions that are not covered by the codemod:
tsc
should be sufficient to find places this needs to be updated manually.How
Create a jscodeshift transform to perform the normal-case transformation from #253. This was created mostly TDD.
Test Plan
tsc
before and after running the codemod, see it auto-fixes all but ~250 errors. (~90%).